/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ronsicecream.pos.master.regional;

import com.buanalintas.bynga.Controller;
import com.buanalintas.bynga.Field;
import com.buanalintas.bynga.Page;
import com.ronsicecream.pos.entities.PosMasterRegional;
import com.ronsicecream.pos.transaction.inputsale.Sale;
import java.util.List;

/**
 *
 * @author user
 */
public class Regional extends Page {

    private Field regionalId;
    private Field regionalName;

    public Regional() {
        super();

        setTheClass(PosMasterRegional.class);




        regionalId = new Field();
        regionalId.setName("regionalId");
        regionalId.setCaption("regional id");
        //regionalId.setInfo("regional id");
        regionalId.setListProperties(" align=\"left\" width=\"1%\" nowrap");
        regionalId.setInputProperties(" size=\"20\"");
        getFields().add(regionalId);
        
        regionalName = new Field();
        regionalName.setName("regionalName");
        regionalName.setCaption("name");
        //regionalName.setInfo("regional name");
        regionalName.setListProperties(" align=\"left\" width=\"60%\" nowrap");
        regionalName.setInputProperties(" size=\"30\"");
        regionalName.setRequired(true);
        getFields().add(regionalName);



        fillFields();
        setExportList(getClass().getResourceAsStream("RegionalList.jasper"));
        setExport(getClass().getResourceAsStream("Regional.jasper"));

        getFieldsAdd().remove(regionalId);
        getFieldsEdit().remove(regionalId);
        getFieldsList().remove(regionalId);
        getFieldsView().remove(regionalId);
        
        setController(new RegionalController(this));
    }
    
    class RegionalController extends Controller {

        public RegionalController(Page page) {
            super(page);
            setOrder(regionalName);
            setOrderType("ASC");
        } 
    }
}
